﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="BookDetail.aspx.cs" Inherits="BookDetail" Title="猎书网-书籍最新更新列表" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

<script src="/model/list.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){   
//投票按钮
     $("#ticketit").bind("click", function(e){
                $.ajax({ url: '/BookInfo.aspx',
                type: 'POST',
                data: { lb: "ticketit",bookid:$("#bookid").val()},
                dataType: 'html',
                timeout: 1000,
                error: function() { $("#result").text("投票时发生错误!");   },
                success: function(data) { 
                    $("#result").text(data); 
                    if(data=="尚未登录")
                                {
                                    window.alert(data);
                                    window.location="/Login.aspx";
                                } 
                }
                }); 
                
    });
//进入书籍目录 
    $("#update").bind("click", function(e){
       window.location="/BookInfo.aspx?BookID="+$("#bookid").val();
    });
//添加到书架按钮
    $("#add").bind("click", function(e){
                $.ajax({ url: '/MyBook.aspx',
                type: 'POST',
                data: { lb: "add",bookid:$("#bookid").val()},
                dataType: 'html',
                timeout: 1000,
                error: function() { $("#result").text("发生未知错误");   },
                success: function(data) { 
                    $("#result").text(data);;       
                }
                }); 
    });
    $("#select").bind("change", function(e){
       window.location="/BookDetail.aspx?BookID="+$("#bookid").val()+"&SiteID="+$("#select").val();
    });    
});   
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="space"></div>
<div class="left">
    <input id="bookid" type="hidden" value="<%getBookID(); %>" />
    <input id="ticketit" type="button" value="投它一票" />  
    <input id="add" type="button" value="加入书架" />  <input name="update" type="button" id="update" value="本书简介"/> <label id="result" class="comment"></label>
</div>
<div class="left"><a href="/BookDetail.aspx?BookID=<% getBookID();%>" class="h">点这里查看所有章节</a>--------温馨提示：下拉菜单中选择网站可以仅显示该网站收集的章节</div>
<table cellpadding="0" cellspacing="0" class="myTable">
<tr>
    <th>最新章节</th>
    <th width="15%">
        <% Response.Write(WebMake.getSiteSelect(Request.QueryString["BookID"].ToString()));%>
    </th>
    <th width="10%">源地址</th>
    <th width="20%">更新时间</th>
  </tr>
<% Response.Write(WebMake.getChapterList(Request, 50));%>
</table>
</asp:Content>

